package com.kirk.cts.core.init;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * <p> InitServiceManager.java </p>
 *
 * @version 1.0.0
 * @Author kirkliu
 * @Date 2020-08-30 16:40
 * @Description
 */
@Component("initServiceManager")
public class InitServiceManager {
    @Autowired
    private List<InitService> initServiceList;

    public void run() {
        if (!CollectionUtils.isEmpty(initServiceList)) {
            for (InitService initService : initServiceList) {
                initService.init();
            }
        }
    }
}
